package com.taobao.pamirs.schedule.test.thread;

public class Thread2 implements Runnable {
	int i = 0;
	
	@Override
	public void run() {
		System.out.println(i);
		try {
			System.out.println(this.getClass().getSimpleName() + "sleep 1 sm");
			Thread.sleep(500);
			i++;
			if(i > 6){
				throw new RuntimeException("thread error");
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	
}
